package com.qf.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 刘亚康
 * @Date 2020/4/6
 * @Version 1.0'
 * @Description
 */
@Configuration
public class SolrRabbitConfig {
    @Bean
    public Queue solrQueue(){
        return new Queue("solrQueue");
    }
    @Bean
    public FanoutExchange goodsExchange(){
        return new FanoutExchange("goodsExchange");
    }
    @Bean
    public Binding bindingDirect_1(Queue solrQueue, FanoutExchange goodsExchange){
        return BindingBuilder.bind(solrQueue).to(goodsExchange);
    }

}
